/*    */ package com.zimbra.cs.servlet;
/*    */ 
/*    */ import javax.servlet.ServletContext;
/*    */ import org.eclipse.jetty.security.Authenticator;
/*    */ import org.eclipse.jetty.security.Authenticator.AuthConfiguration;
/*    */ import org.eclipse.jetty.security.DefaultAuthenticatorFactory;
/*    */ import org.eclipse.jetty.security.IdentityService;
/*    */ import org.eclipse.jetty.security.LoginService;
/*    */ import org.eclipse.jetty.server.Server;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class ZimbraAuthenticatorFactory
/*    */   extends DefaultAuthenticatorFactory
/*    */ {
/* 35 */   public static String ZIMBRA_AUTH_MECHANISM = "ZimbraAuth";
/*    */   
/* 37 */   private ZimbraAuthenticator zimbraAuthenticator = new ZimbraAuthenticator();
/*    */   
/*    */   public void setUrlPattern(String pattern) {
/* 40 */     this.zimbraAuthenticator.setUrlPattern(pattern);
/*    */   }
/*    */   
/*    */ 
/*    */   public Authenticator getAuthenticator(Server server, ServletContext context, Authenticator.AuthConfiguration configuration, IdentityService identityService, LoginService loginService)
/*    */   {
/* 46 */     String auth = configuration.getAuthMethod();
/* 47 */     if (ZIMBRA_AUTH_MECHANISM.equalsIgnoreCase(auth)) {
/* 48 */       return this.zimbraAuthenticator;
/*    */     }
/* 50 */     return super.getAuthenticator(server, context, configuration, identityService, loginService);
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/servlet/ZimbraAuthenticatorFactory.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */